import http from '@/utils/request'

//  获取市数验证码
export const loginService = (data, config) => {
	return http.get(`/auth/sys/user/login`, data, config)
}

//  修改密码
export const updatePwd = (data, config) => {
  return http.put(`/system/userInfo/updatePwd?newPassword=${data.newPassword}&oldPassword=${data.oldPassword}`, data, config)
}

// 获取验证码
export const sendSmsCode = (data, config) => {
  return http.post(`/auth/code?phone=${data.phone}`, data, config)
}

//  忘记密码
export const forgetPwd = (data, config) => {
  return http.put(`/system/userInfo/forgetPwd`, data, config)
}

// 判断是否授权
export const getIsAccess = (data, config) => {
  return http.post(`/authorization/authorizationcontroller/isCanAccess`, {}, config)
}
